<template>
  <div>{{ name }}</div>
  <button @click="onClick">setup-child click</button>
</template>

<script setup lang="ts">
import { defineProps, defineEmit } from "vue"; // props emit
defineProps({
  name: {
    type: String,
    required: true
  }
});
let emit = defineEmit(["click"]);
const onClick = () => {
  emit("click", { name: "setup-child" });
  console.log("click。。。");
};
</script>

<style scoped></style>
